# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AccessContextManager.V1.Model.SupportedService do
  @moduledoc """
  `SupportedService` specifies the VPC Service Controls and its properties.

  ## Attributes

  *   `availableOnRestrictedVip` (*type:* `boolean()`, *default:* `nil`) - True if the service is available on the restricted VIP. Services on the restricted VIP typically either support VPC Service Controls or are core infrastructure services required for the functioning of Google Cloud.
  *   `knownLimitations` (*type:* `boolean()`, *default:* `nil`) - True if the service is supported with some limitations. Check [documentation](https://cloud.google.com/vpc-service-controls/docs/supported-products) for details.
  *   `name` (*type:* `String.t`, *default:* `nil`) - The service name or address of the supported service, such as `service.googleapis.com`.
  *   `serviceSupportStage` (*type:* `String.t`, *default:* `nil`) - The support stage of the service.
  *   `supportStage` (*type:* `String.t`, *default:* `nil`) - The support stage of the service.
  *   `supportedMethods` (*type:* `list(GoogleApi.AccessContextManager.V1.Model.MethodSelector.t)`, *default:* `nil`) - The list of the supported methods. This field exists only in response to GetSupportedService
  *   `title` (*type:* `String.t`, *default:* `nil`) - The name of the supported product, such as 'Cloud Product API'.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :availableOnRestrictedVip => boolean() | nil,
          :knownLimitations => boolean() | nil,
          :name => String.t() | nil,
          :serviceSupportStage => String.t() | nil,
          :supportStage => String.t() | nil,
          :supportedMethods =>
            list(GoogleApi.AccessContextManager.V1.Model.MethodSelector.t()) | nil,
          :title => String.t() | nil
        }

  field(:availableOnRestrictedVip)
  field(:knownLimitations)
  field(:name)
  field(:serviceSupportStage)
  field(:supportStage)

  field(:supportedMethods, as: GoogleApi.AccessContextManager.V1.Model.MethodSelector, type: :list)

  field(:title)
end

defimpl Poison.Decoder, for: GoogleApi.AccessContextManager.V1.Model.SupportedService do
  def decode(value, options) do
    GoogleApi.AccessContextManager.V1.Model.SupportedService.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.AccessContextManager.V1.Model.SupportedService do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
